import { Col, Modal, Row } from "antd";
import React, { Component, Fragment } from "react";
import propTypes from "prop-types";

export default class CustomModal extends Component {
    constructor() {
        super();
        this.state = {};
    }
    render() {
        let { visible, title, okText, cancelText, onOk, onCancel } = this.props;
        return (
            <Fragment>
                <Modal visible={visible} title={title} okText={okText} cancelText={cancelText} onOk={onOk} onCancel={onCancel} className="modalForm">
                    {this.props.children}
                </Modal>
            </Fragment>
        );
    }
}
const { bool, string, func } = propTypes;
CustomModal.propTypes = {
    visible: bool,
    title: string,
    okText: string,
    cancelText: string,
    onOk: func,
    onCancel: func,
};
CustomModal.defaultProps = {
    visible: false,
    title: "编辑",
    okText: "提交",
    cancelText: "取消",
    onOk: () => {},
    onCancel: () => {},
};
